<template>
	<view class="body">
		<!-- 头部导航组件 -->
		<view class="detail-head">
			<trade-nav title="直播详情"></trade-nav>
		</view>
		<!-- banner -->
		<view class="banner">
			<image src="https://img.js.design/assets/img/62651f8e40e0d9c86d357beb.png" mode="widthFix"></image>
			<view class="banner-describe">
				<view class="left">
					<title>连锁学校如何打造</title>
					<view class="tag">会员观看</view>
					<p>直播时间：2022-03-02 12:00:00</p>
				</view>
				<view class="right">
					<view>
						<uni-icons type="heart-filled" size="20" color="#d43030"></uni-icons>
						关注
					</view>
					<view>
						<uni-icons type="compose" size="20" color="#d43030"></uni-icons>
						邀约
					</view>

				</view>
			</view>
		</view>
		<!-- content -->
		<live-content-list></live-content-list>
		<!-- 弹层 -->
		<view class="popup" v-if="show">
			<view>
				<uni-icons type="close" size="20" @click="close"></uni-icons>
				<text>邀请好友</text>
				<view>
					<view class="item">
						<image src="https://img.js.design/assets/img/60e7bc3e695146d4363549df.png" mode="aspectFit">
						</image>
						<text>邀请好友</text>
					</view>
					<view class="item" @click="showBill">
						<image src="https://img.js.design/assets/img/60e7bc3e695146d4363549df.png" mode="aspectFit">
						</image>
						<text>邀约海报</text>
					</view>
				</view>
			</view>
		</view>

		<!-- 邀约海报 -->
		<view class="">
			<view class="bill-contebt" v-if="isBill">
				<view class="img">
					<image src="https://img.js.design/assets/img/62e890372f94b598e84ad412.png" mode="center"></image>
				</view>
				<text>寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假寒假</text>
				<view class="time">
					<view>
						<view class="img">
							<image src="../../static/live/路径 1812.png"></image>
						</view>
						<view class="date">直播日期：202-10-20 10：00</view>
					</view>
				</view>
				<view class="bill">
					
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 弹出层是否显示
				show: true,
				// 邀约海报是否显示
				isBill: false
			};
		},
		onLoad(options) {
			console.log(options.id)
		},
		methods: {
			close() {
				this.show = false;
			},
			// 显示邀约海报
			showBill() {
				// 隐藏弹出框
				this.show = false

				this.isBill = true
			}
		}
	}
</script>

<style lang="scss">
	.body {
		position: relative;
		font-family: "思源黑体";
	}

	.detail-head {
		height: 176rpx;
	}

	.banner {
		width: 100%;
		height: 460rpx;
		position: relative;
		overflow: hidden;

		image {
			width: 100%;
			position: absolute;
		}

		.banner-describe {
			display: flex;
			justify-content: space-between;
			position: absolute;
			z-index: 999;
			left: 0;
			bottom: 0;
			background-color: #ffffff;
			width: 92%;
			height: 130rpx;
			padding: 20rpx 32rpx;

			.left {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				position: relative;
				width: 430rpx;

				title {
					font-size: 40rpx;
					color: #333333;
				}

				.tag {
					position: absolute;
					right: 0;
					top: 0;
					background-color: #ff8800;
					color: #FFFFFF;
					font-size: 16rpx;
					width: 100rpx;
					height: 30rpx;
					border-radius: 4rpx;
					line-height: 30rpx;
					text-align: center;
				}

				p {
					padding: 0;
					margin: 0;
					font-size: 24rpx;
					color: #999999;
				}
			}

			.right {
				display: flex;

				view {
					display: flex;
					flex-direction: column;
					font-size: 28rpx;
					align-items: center;
					justify-content: space-between;

					&:first-child {
						margin-right: 20rpx;
					}
				}
			}
		}

	}

	.popup {
		width: 100%;
		height: 100vh;
		position: absolute;
		top: 0;
		margin: 0;
		z-index: 999;
		background: rgba(0, 0, 0, 0.1);

		>view {
			width: 600rpx;
			height: 360rpx;
			margin: 0 auto;
			margin-top: 480rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			padding: 20rpx;
			position: relative;

			.uni-icons {
				position: absolute;
				right: 20rpx;
			}

			>text {
				font-size: 40rpx;
				margin-top: 40rpx;
				margin-bottom: 34rpx;
			}

			view {
				width: 392rpx;
				margin: 0 auto;
				display: flex;
				justify-content: space-between;

				.item {
					height: 160rpx;
					width: 130rpx;
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: space-between;
					margin-bottom: 24rpx;
					// background-color: red;

					// image {
					// 	width: 130rpx;
					// 	height: 130rpx;
					// }

					text {
						font-size: 28rpx;
						margin-top: 24rpx;
					}
				}
			}
		}
	}

	// 海报
	.bill-contebt {
		width: 697rpx;
		height: 1000rpx;
		position: absolute;
		z-index: 999;
		top: 20%;
		left: 50%;
		margin-left: -345rpx;
		overflow: hidden;
		background-color: #ffffff;

		.img {
			width: 100%;
			height: 390rpx;
			overflow: hidden;

			image {
				width: 100%;
				margin-top: -48rpx;
			}
		}

		text {
			margin: 18rpx auto;
			width: 640rpx;
			height: 114rpx;
			font-size: 40rpx;
			display: -webkit-box;
			overflow: hidden;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 2;
		}

		.time {
			width: 640rpx;
			height: 36rpx;
			border-top: 1px dashed #999999;
			margin: 0 auto;
			font-size: 28rpx;
			color: #E90C0C;
			padding-top: 34rpx;

			// padding-left: ;
			>view {
				margin: 0 auto;
				width: 410rpx;
				display: flex;
				align-items: center;

				.img {
					width: 28rpx;
					height: 28rpx;
					margin-right: 24rpx;
				}

				image {
					width: 28rpx;
					height: 28rpx;
				}

				text {
					margin: 0;
					padding: 0;
				}

				.date {}
			}

		}
		
		.bill {
			width: 558rpx;
			height: 162rpx;
			margin: 40rpx auto 0 auto;
		}
	}
</style>
